home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / nano / ruby.nanorc < prev    next >
Text File  |  2009-03-30  |  1KB  |  31 lines

  1. ## Here is an example for Ruby.
  2. ##
  3. syntax "ruby" "\.rb$"
  4. ## Asciibetical list of reserved words
  5. color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
  6. ## Constants
  7. color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
  8. ## Ruby "symbols"
  9. icolor magenta "([     ]|^):[0-9A-Z_]+\>"
  10. ## Some unique things we want to stand out
  11. color brightyellow "\<(__FILE__|__LINE__)\>"
  12. ## Regular expressions
  13. color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
  14. ## Shell command expansion is in `backticks` or like %x{this}.  These are
  15. ## "double-quotish" (to use a perlism).
  16. color brightblue "`[^`]*`" "%x\{[^}]*\}"
  17. ## Strings, double-quoted
  18. color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
  19. ## Expression substitution.  These go inside double-quoted strings,
  20. ## "like #{this}".
  21. color brightgreen "#\{[^}]*\}"
  22. ## Strings, single-quoted
  23. color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
  24. ## Comments
  25. color cyan "#[^{].*$" "#$"
  26. color brightcyan "##[^{].*$" "##$"
  27. ## "Here" docs
  28. color green start="<<-?'?EOT'?" end="^EOT"
  29. ## Some common markers
  30. color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
  31.